package com.qmsign.project.utils;

public class IdWorker {
    public static String getSnowId(){
        int workerId = (int)(Math.random()*10+22);//机器ID 0-31
        int datacenterId = (int)(Math.random()*10+22);//机房ID 0-31
        int sequence = (int)(Math.random()*10+4086);//每毫秒产生序号个数 0-4095
        SnowFactory worker = new SnowFactory(workerId, datacenterId, sequence);
        String id = String.valueOf(worker.nextId());
        return id;
    }
}
